﻿using QLTour.Dal;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QLTour.Biz
{
    public class DiaDiemBiz
    {
        public int MaDiaDiem { get; set; }
        public string Ten { get; set; }
        private DiaDiemDal dal = new DiaDiemDal();

        public DiaDiemBiz(int ma, string ten) 
        {
            MaDiaDiem = ma;
            Ten = ten;
        }
        public DiaDiemBiz() { }
        public Boolean Insert()
        {
            return dal.Insert(this);
        }
        public Boolean Update()
        {
            return dal.Update(this);
        }
        public Boolean Delete()
        {
            return dal.Delete(this);
        }
        public override string ToString()
        {
            return Ten;
        }

        public static List<DiaDiemBiz> GetAllDiaDiem()
        {
            DiaDiemDal dal = new DiaDiemDal();
            return dal.GetAllDiaDiem();
        }
    }
}
